// import React from 'react'
import './CumulativeTips.css'
import { useNavigate } from 'react-router-dom'

export default function CumulativeTips() {
    const navigate = useNavigate()
    const back = () => {
        navigate('/rider/my')
    }
    const now = new Date();

    const formattedTime = `${now.getFullYear()}-${(now.getMonth() + 1).toString().padStart(2, '0')}-${now.getDate().toString().padStart(2, '0')}`;
    return (
        <div className="rider-tip-box">
            <div className="rider-tip-title">
                <button onClick={back}>返回</button>
                <h3>累积小费</h3>
            </div>
            <div className='rider-tip-time'>
                {formattedTime}
            </div>
            <div className='rider-tip-item'>
                <div className='tip-item-title'>
                    收益记录
                </div>
                <div className='tip-item-item'>
                    <span className='item-item-left'>
                        <div className='item-left-id'>订单114514114514</div>
                        <div className='item-left-time'>2023-02-30 10:10:10</div>
                    </span>
                    <span className='item-item-right'>
                        +2
                    </span>
                </div>

            </div>
        </div>
    )
}
